package com.integralPerformance.pojo.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 岗位申请管理表
 * @TableName application_manager
 */
@TableName(value ="application_manager")
@Data
public class ApplicationManager implements Serializable {
    /**
     * 唯一标识符
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 聘岗申请年份
     */
    private String year;

    /**
     * job_position表id
     */
    private Integer jobPositionId;

    /**
     * 描述
     */
    private String describeText;

    /**
     * 条件List< PositionResult >  聘用条件
     */
    private Object poc;

    /**
     * 是否处于聘任申请开启状态
     */
    private String isOpen;

    /**
     * 效业绩开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date operativeStartDate;

    /**
     * 效业绩结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date operativeEndDate;

    /**
     * 开始任职时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date startDate;

    /**
     * 结束任职任职时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date endDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ApplicationManager other = (ApplicationManager) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getYear() == null ? other.getYear() == null : this.getYear().equals(other.getYear()))
            && (this.getJobPositionId() == null ? other.getJobPositionId() == null : this.getJobPositionId().equals(other.getJobPositionId()))
            && (this.getDescribeText() == null ? other.getDescribeText() == null : this.getDescribeText().equals(other.getDescribeText()))
            && (this.getPoc() == null ? other.getPoc() == null : this.getPoc().equals(other.getPoc()))
            && (this.getIsOpen() == null ? other.getIsOpen() == null : this.getIsOpen().equals(other.getIsOpen()))
            && (this.getOperativeStartDate() == null ? other.getOperativeStartDate() == null : this.getOperativeStartDate().equals(other.getOperativeStartDate()))
            && (this.getOperativeEndDate() == null ? other.getOperativeEndDate() == null : this.getOperativeEndDate().equals(other.getOperativeEndDate()))
            && (this.getStartDate() == null ? other.getStartDate() == null : this.getStartDate().equals(other.getStartDate()))
            && (this.getEndDate() == null ? other.getEndDate() == null : this.getEndDate().equals(other.getEndDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getYear() == null) ? 0 : getYear().hashCode());
        result = prime * result + ((getJobPositionId() == null) ? 0 : getJobPositionId().hashCode());
        result = prime * result + ((getDescribeText() == null) ? 0 : getDescribeText().hashCode());
        result = prime * result + ((getPoc() == null) ? 0 : getPoc().hashCode());
        result = prime * result + ((getIsOpen() == null) ? 0 : getIsOpen().hashCode());
        result = prime * result + ((getOperativeStartDate() == null) ? 0 : getOperativeStartDate().hashCode());
        result = prime * result + ((getOperativeEndDate() == null) ? 0 : getOperativeEndDate().hashCode());
        result = prime * result + ((getStartDate() == null) ? 0 : getStartDate().hashCode());
        result = prime * result + ((getEndDate() == null) ? 0 : getEndDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", year=").append(year);
        sb.append(", jobPositionId=").append(jobPositionId);
        sb.append(", describeText=").append(describeText);
        sb.append(", poc=").append(poc);
        sb.append(", isOpen=").append(isOpen);
        sb.append(", operativeStartDate=").append(operativeStartDate);
        sb.append(", operativeEndDate=").append(operativeEndDate);
        sb.append(", startDate=").append(startDate);
        sb.append(", endDate=").append(endDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}